<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Referência da Template de Classe selection_by_roulette&lt; _ty, _realTy &gt;</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Gerado por Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Busca');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;Principal</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Arquivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Busca" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Lista&nbsp;de&nbsp;Componentes</span></a></li>
      <li><a href="hierarchy.html"><span>Hierarquia&nbsp;de&nbsp;Classes</span></a></li>
      <li><a href="functions.html"><span>Componentes&nbsp;Membros</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Referência da Template de Classe selection_by_roulette&lt; _ty, _realTy &gt;</h1><!-- doxytag: class="selection_by_roulette" --><!-- doxytag: inherits="genetic_operator" -->
<p><code>#include &lt;<a class="el" href="selection__by__roulette_8h_source.html">selection_by_roulette.h</a>&gt;</code></p>
<div class="dynheader">
Diagrama de Hierarquia para selection_by_roulette&lt; _ty, _realTy &gt;:</div>
<div class="dynsection">
 <div class="center">
  <img src="classselection__by__roulette.png" usemap="#selection_by_roulette&lt; _ty, _realTy &gt;_map" alt=""/>
  <map id="selection_by_roulette&lt; _ty, _realTy &gt;_map" name="selection_by_roulette&lt; _ty, _realTy &gt;_map">
<area href="classgenetic__operator.html" alt="genetic_operator&lt; _ty, _realTy &gt;" shape="rect" coords="0,0,225,24"/>
</map>
 </div>
</div>

<p><a href="classselection__by__roulette-members.html">Lista de todos os Membros.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Tipos Públicos</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; std::pair<br class="typebreak"/>
&lt; _realTy, <a class="el" href="classindividual.html">individual</a>&lt; _ty, <br class="typebreak"/>
_realTy &gt; * &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a4c224a095113f38dce7d98f10d8c0833">_RouletteTy</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; std::pair<br class="typebreak"/>
&lt; _realTy, <a class="el" href="classindividual.html">individual</a>&lt; _ty, <br class="typebreak"/>
_realTy &gt; * &gt; &gt;::iterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a557d2432eb36aba61aa31a9e4b0dcb54">it_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; std::pair<br class="typebreak"/>
&lt; _realTy, <a class="el" href="classindividual.html">individual</a>&lt; _ty, <br class="typebreak"/>
_realTy &gt;<br class="typebreak"/>
 * &gt; &gt;::const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#ac64df0d86cf8396ce91df17d9ce27f0e">const_it_</a></td></tr>
<tr><td colspan="2"><h2>Métodos Públicos</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a043cefe0479622491fea593c7f28ddfa">selection_by_roulette</a> (<a class="el" href="classpopulation.html">population</a>&lt; _ty, _realTy &gt; *pt_to_apply_operator=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a137f1a757ab4d71a0ca0bdba7f9f35d0">GetName</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const char &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#abb536fd7b63a452a2ebd8e7572bfc4d8">WalkOnIndividualHook</a> (<a class="el" href="classcoordinate.html">coordinate</a>&lt; _ty, _realTy &gt; &amp;coo)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const char &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a98be3d54afb87450f190615f7da330e9">WalkOnPopulationHook</a> (<a class="el" href="classindividual.html">individual</a>&lt; _ty, _realTy &gt; &amp;id)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classselection__by__roulette.html#ac64df0d86cf8396ce91df17d9ce27f0e">const_it_</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a8d04a76229aa2d0c68c1a945e77d8e19">begin</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classselection__by__roulette.html#ac64df0d86cf8396ce91df17d9ce27f0e">const_it_</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#a2abe33c34280ba81f0f0dab12c8e875b">end</a> (void) const </td></tr>
<tr><td colspan="2"><h2>Métodos Protegidos</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#ac3db5bbe67ee2aa4e1942fd983d3cc80">GenerateRoulette</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classselection__by__roulette.html#ae19e7e752f54ab03983be567c8d10392">RotateRoulette</a> (void)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Descrição Detalhada</h2>
<h3>template&lt;typename _ty, typename _realTy&gt;<br/>
 class selection_by_roulette&lt; _ty, _realTy &gt;</h3>

<p>Classe template que encapsula os métodos e atributos de um operador genético de seleção por torneio. Herda da classe <a class="el" href="classgenetic__operator.html">genetic_operator</a>. Os métods principais são <a class="el" href="classselection__by__roulette.html#ac3db5bbe67ee2aa4e1942fd983d3cc80">GenerateRoulette()</a> e <a class="el" href="classselection__by__roulette.html#ae19e7e752f54ab03983be567c8d10392">RotateRoulette()</a>.</p>
<dl><dt><b>Template Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>_ty</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>_realTy</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>
<hr/><h2>Definições de Tipos</h2>
<a class="anchor" id="a4c224a095113f38dce7d98f10d8c0833"></a><!-- doxytag: member="selection_by_roulette::_RouletteTy" ref="a4c224a095113f38dce7d98f10d8c0833" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef std::vector&lt;std::pair&lt;_realTy,<a class="el" href="classindividual.html">individual</a>&lt;_ty,_realTy&gt;*&gt; &gt; <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::<a class="el" href="classselection__by__roulette.html#a4c224a095113f38dce7d98f10d8c0833">_RouletteTy</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Definição do container que armazena uma roleta. </p>

</div>
</div>
<a class="anchor" id="ac64df0d86cf8396ce91df17d9ce27f0e"></a><!-- doxytag: member="selection_by_roulette::const_it_" ref="ac64df0d86cf8396ce91df17d9ce27f0e" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef std::vector&lt;std::pair&lt;_realTy,<a class="el" href="classindividual.html">individual</a>&lt;_ty,_realTy&gt;*&gt; &gt;::const_iterator <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::<a class="el" href="classselection__by__roulette.html#ac64df0d86cf8396ce91df17d9ce27f0e">const_it_</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Definição para um iterator constante que percorre o container da roleta. </p>

</div>
</div>
<a class="anchor" id="a557d2432eb36aba61aa31a9e4b0dcb54"></a><!-- doxytag: member="selection_by_roulette::it_" ref="a557d2432eb36aba61aa31a9e4b0dcb54" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef std::vector&lt;std::pair&lt;_realTy,<a class="el" href="classindividual.html">individual</a>&lt;_ty,_realTy&gt;*&gt; &gt;::iterator <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::<a class="el" href="classselection__by__roulette.html#a557d2432eb36aba61aa31a9e4b0dcb54">it_</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Definição para um iterator que percorre o container da roleta. </p>

</div>
</div>
<hr/><h2>Construtores &amp; Destrutores</h2>
<a class="anchor" id="a043cefe0479622491fea593c7f28ddfa"></a><!-- doxytag: member="selection_by_roulette::selection_by_roulette" ref="a043cefe0479622491fea593c7f28ddfa" args="(population&lt; _ty, _realTy &gt; *pt_to_apply_operator=NULL)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::<a class="el" href="classselection__by__roulette.html">selection_by_roulette</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classpopulation.html">population</a>&lt; _ty, _realTy &gt; *&nbsp;</td>
          <td class="paramname"> <em>pt_to_apply_operator</em> = <code>NULL</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Método construtor.</p>
<p>pt_to_apply_operator Ponteiro para a população na qual será aplicado o operador. </p>

</div>
</div>
<hr/><h2>Métodos</h2>
<a class="anchor" id="a8d04a76229aa2d0c68c1a945e77d8e19"></a><!-- doxytag: member="selection_by_roulette::begin" ref="a8d04a76229aa2d0c68c1a945e77d8e19" args="(void) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classselection__by__roulette.html#ac64df0d86cf8396ce91df17d9ce27f0e">const_it_</a> <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::begin </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Método que retorna um iterator para percorrer a roleta.</p>
<dl class="return"><dt><b>Retorna:</b></dt><dd>Iterator para o começo do container que armazena a roleta. </dd></dl>

</div>
</div>
<a class="anchor" id="a2abe33c34280ba81f0f0dab12c8e875b"></a><!-- doxytag: member="selection_by_roulette::end" ref="a2abe33c34280ba81f0f0dab12c8e875b" args="(void) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classselection__by__roulette.html#ac64df0d86cf8396ce91df17d9ce27f0e">const_it_</a> <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::end </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Métod que retorna um iterator para percorre a roleta.</p>
<dl class="return"><dt><b>Retorna:</b></dt><dd>Iterator para o fim da roleta. </dd></dl>

</div>
</div>
<a class="anchor" id="ac3db5bbe67ee2aa4e1942fd983d3cc80"></a><!-- doxytag: member="selection_by_roulette::GenerateRoulette" ref="ac3db5bbe67ee2aa4e1942fd983d3cc80" args="(void)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::GenerateRoulette </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constrói a roleta(preenche _myRoulette) </p>

</div>
</div>
<a class="anchor" id="a137f1a757ab4d71a0ca0bdba7f9f35d0"></a><!-- doxytag: member="selection_by_roulette::GetName" ref="a137f1a757ab4d71a0ca0bdba7f9f35d0" args="(void)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::GetName </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retorna o nome da classe para o padrão AbstractFactory</p>
<dl class="return"><dt><b>Retorna:</b></dt><dd>Uma string com o nome da classe. </dd></dl>

<p>Reimplementação de <a class="el" href="classgenetic__operator.html#ae0f79368c0b4ad0cff3f608727bd87f5">genetic_operator&lt; _ty, _realTy &gt;</a>.</p>

</div>
</div>
<a class="anchor" id="ae19e7e752f54ab03983be567c8d10392"></a><!-- doxytag: member="selection_by_roulette::RotateRoulette" ref="ae19e7e752f54ab03983be567c8d10392" args="(void)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::RotateRoulette </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Realiza a seleção propriamente dita, ou seja roda a roleta </p>

</div>
</div>
<a class="anchor" id="abb536fd7b63a452a2ebd8e7572bfc4d8"></a><!-- doxytag: member="selection_by_roulette::WalkOnIndividualHook" ref="abb536fd7b63a452a2ebd8e7572bfc4d8" args="(coordinate&lt; _ty, _realTy &gt; &amp;coo)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual const char&amp; <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::WalkOnIndividualHook </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcoordinate.html">coordinate</a>&lt; _ty, _realTy &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>coo</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>O método de seleção por roleta não realiza nenhuma operação direta sobre as coordenadas</p>
<p>coo A coordenada onde seria aplicado o operador.</p>
<dl class="return"><dt><b>Retorna:</b></dt><dd>A direção de caminhada do vetor. </dd></dl>

<p>Implementa <a class="el" href="classgenetic__operator.html#a2124d70b28b35d3114eb3e3ffa72baef">genetic_operator&lt; _ty, _realTy &gt;</a>.</p>

</div>
</div>
<a class="anchor" id="a98be3d54afb87450f190615f7da330e9"></a><!-- doxytag: member="selection_by_roulette::WalkOnPopulationHook" ref="a98be3d54afb87450f190615f7da330e9" args="(individual&lt; _ty, _realTy &gt; &amp;id)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ty , typename _realTy &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const char &amp; <a class="el" href="classselection__by__roulette.html">selection_by_roulette</a>&lt; _ty, _realTy &gt;::WalkOnPopulationHook </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classindividual.html">individual</a>&lt; _ty, _realTy &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>id</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>O método de seleção por roleta realiza operações diretamente nos indivíduos</p>
<p>id O indivíduo aonde será aplicado o operador de seleção.</p>
<dl class="return"><dt><b>Retorna:</b></dt><dd>A direção da caminhada do vetor. </dd></dl>

<p>Implementa <a class="el" href="classgenetic__operator.html#a3405bb5335111bd675d408aa8db052fa">genetic_operator&lt; _ty, _realTy &gt;</a>.</p>

</div>
</div>
<hr/>A documentação para esta classe foi gerada a partir do seguinte arquivo:<ul>
<li><a class="el" href="selection__by__roulette_8h_source.html">selection_by_roulette.h</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Todos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Arquivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Funções</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variáveis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Definições de Tipos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Amigas</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Gerado em Sat Oct 30 13:47:51 2010 por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
